package com.hjm.project.statistical.standard.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;
import com.hjm.project.statistical.standard.mapper.AgentMonthStandardMapper;
import com.hjm.project.statistical.standard.domain.AgentMonthStandard;
import com.hjm.project.statistical.standard.service.IAgentMonthStandardService;
import com.hjm.common.utils.text.Convert;

import javax.annotation.Resource;

/**
 * 达标台均Service业务层处理
 * 
 * @author maker-platform
 * @date 2021-06-23
 */
@Service
public class AgentMonthStandardServiceImpl implements IAgentMonthStandardService 
{
    @Resource
    private AgentMonthStandardMapper agentMonthStandardMapper;

    /**
     * 查询达标台均
     * 
     * @param id 达标台均ID
     * @return 达标台均
     */
    @Override
    public AgentMonthStandard selectAgentMonthStandardById(Integer id)
    {
        return agentMonthStandardMapper.selectAgentMonthStandardById(id);
    }

    /**
     * 查询达标台均列表
     * 
     * @param agentMonthStandard 达标台均
     * @return 达标台均
     */
    @Override
    public List<AgentMonthStandard> selectAgentMonthStandardList(AgentMonthStandard agentMonthStandard)
    {
        return agentMonthStandardMapper.selectAgentMonthStandardList(agentMonthStandard);
    }

    /**
     * 新增达标台均
     * 
     * @param agentMonthStandard 达标台均
     * @return 结果
     */
    @Override
    public int insertAgentMonthStandard(AgentMonthStandard agentMonthStandard)
    {
        return agentMonthStandardMapper.insertAgentMonthStandard(agentMonthStandard);
    }

    /**
     * 修改达标台均
     * 
     * @param agentMonthStandard 达标台均
     * @return 结果
     */
    @Override
    public int updateAgentMonthStandard(AgentMonthStandard agentMonthStandard)
    {
        return agentMonthStandardMapper.updateAgentMonthStandard(agentMonthStandard);
    }

    /**
     * 删除达标台均对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteAgentMonthStandardByIds(String ids)
    {
        return agentMonthStandardMapper.deleteAgentMonthStandardByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除达标台均信息
     * 
     * @param id 达标台均ID
     * @return 结果
     */
    @Override
    public int deleteAgentMonthStandardById(Integer id)
    {
        return agentMonthStandardMapper.deleteAgentMonthStandardById(id);
    }



    /**
     * 统计达标率
     * @Param [agentMonthStandard]
     * @Return com.hjm.project.statistical.standard.domain.AgentMonthStandard
     */
    @Override
    public AgentMonthStandard selectMontSum(AgentMonthStandard agentMonthStandard) {
        return agentMonthStandardMapper.selectMontSum(agentMonthStandard);
    }

}
